From: Colin Walters Date: Fri, 5 Dec 2008 21:12:43 +0000 (+0000) Subject: Connect to overlay-key signal from metacity-clutter to hide/show overlay X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~11521 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b1da771d3224ee5e4a42c15fee1ffc56295eaacc;p=gnome-shell.git Connect to overlay-key signal from metacity-clutter to hide/show overlay We want to effectively bind the "Windows key" on PC hardware to hide and show the overlay. svn path=/trunk/; revision=120 --- diff --git a/js/ui/main.js b/js/ui/main.js index 1f390aa41..aef8057fb 100644 --- a/js/ui/main.js +++ b/js/ui/main.js @@ -120,6 +120,15 @@ function start() { overlay = new Overlay.Overlay(); wm = new WindowManager.WindowManager(); + + let display = global.screen.get_display(); + display.connect('overlay-key', function(display) { + if (overlay.visible) { + hide_overlay(); + } else { + show_overlay(); + } + }); } // Used to go into a mode where all keyboard and mouse input goes to